// import store from '@/store'
import axios from '@/utils/request'
export function onSubmit(mobile, code) {
  return axios({
    method: 'post',
    url: '/v1_0/authorizations',
    data: {
      mobile,
      code
    }
  })
}
export function getUserInfo() {
  return axios({
    method: 'get',
    url: '/v1_0/user/profile'
    // headers: {
    //   Authorization: 'Bearer ' + store.state.user.token.token
    // }
  })
}
export function upDataUserInfo(data) {
  return axios({
    method: 'PATCH',
    url: '/v1_0/user/profile',
    data: data
  })
}
export function uploadPhoto(fd) {
  return axios({
    method: 'patch',
    url: '/v1_0/user/photo',
    data: fd
  })
}
